package edu.hebeu.controller;


import edu.hebeu.entity.Attendance;
import edu.hebeu.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("attendance")
public class AttendanceController {
    @Autowired
    private AttendanceService attendanceService;
    //查看考勤记录
    @RequestMapping("/{employeeNumber}/oneself.do")
    public  String  attone(@PathVariable Integer employeeNumber, Model model){
        List<Attendance> aList  =attendanceService.selectLis(employeeNumber);
             model.addAttribute("aList",aList);
        return "admin/oneself_attendance";
       /* List<Attendance> aList = attendanceService.selectLis(employeeNumber);
        model.addAttribute("aList",aList);
        return  "admin/attendance_list";*/
    }



}
